/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package server;

import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 *
 * @author Mateusz
 */
public class SVNDownloader {

    public void download(String address, String username, String password) {
        try {
            Runtime rt = Runtime.getRuntime();
            System.out.println("./SVNCheckout.bat "+address+" "+username+" "+password);
            Process pr = rt.exec("./SVNCheckout.bat "+address+" "+username+" "+password);
            /*BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));

            String line = null;

            while ((line = input.readLine()) != null) {
                System.out.println(line);
            }

            int exitVal = pr.waitFor();
            System.out.println("Exited with error code " + exitVal);*/
            //check certificate

        } catch (Exception e) {
            //TODO
            System.out.println(e.toString());
            e.printStackTrace();
        }
    }
}
